package com.wxk.client.controller;
import com.wxk.entity.http.HttpResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;

@RestController
@RequestMapping("/client/order")
public class OrderController extends BaseController{
    @Resource
    private RestTemplate restTemplate;

    private String orderUrl="http://SPRING-CLOUD-ORDER";

    @GetMapping("getAllOrderList")
    public HttpResult getAllOrderList() {
        return restTemplate.getForEntity(orderUrl+"/api/order/getAllOrderList",HttpResult.class).getBody();
    }
}
